package com.mrd.gtimpframe.entity;

import java.io.Serializable;
import java.util.Date;

public class ComDeclaProp implements Serializable {
	public enum PropKey {
        /**
         * ftp地址
         */
		FTP_URL,
        /**
         * ftp端口
         */
		FTP_PORT,
        /**
         * ftp账号
         */
		FTP_ACCOUNT,
        /**
         * ftp密码
         */
		FTP_PWD,
        /**
         * 上传地址
         */
		HTTP_IMPORT_URL,
        /**
         * 回执地址
         */
		HTTP_RECEIPT_URL,
        /**
         * 公司代码
         */
		HTTP_COM_CODE,
		/**
		 * 公司代码
		 */
		HTTP_COM_ID,
        /**
         * 账号
         */
		HTTP_COM_ACCOUNT,
        /**
         * 密码
         */
		HTTP_COM_PWD
	}

	private String				id;

	private String				cdWayId;

	private String				pkey;

	private String				pvalue;

	private String				status;

	private String				creator;

	private Date				ctime;

	private static final long	serialVersionUID	= 1L;

	public ComDeclaProp(String id, String cdWayId, String pkey, String pvalue, String status,
	        String creator, Date ctime) {
		this.id = id;
		this.cdWayId = cdWayId;
		this.pkey = pkey;
		this.pvalue = pvalue;
		this.status = status;
		this.creator = creator;
		this.ctime = ctime;
	}

	public ComDeclaProp() {
		super();
	}

	public String getId() {
		return id;
	}

	public void setId(String id) {
		this.id = id == null ? null : id.trim();
	}

	public String getCdWayId() {
		return cdWayId;
	}

	public void setCdWayId(String cdWayId) {
		this.cdWayId = cdWayId == null ? null : cdWayId.trim();
	}

	public String getPkey() {
		return pkey;
	}

	public void setPkey(String pkey) {
		this.pkey = pkey == null ? null : pkey.trim();
	}

	public String getPvalue() {
		return pvalue;
	}

	public void setPvalue(String pvalue) {
		this.pvalue = pvalue == null ? null : pvalue.trim();
	}

	public String getStatus() {
		return status;
	}

	public void setStatus(String status) {
		this.status = status == null ? null : status.trim();
	}

	public String getCreator() {
		return creator;
	}

	public void setCreator(String creator) {
		this.creator = creator == null ? null : creator.trim();
	}

	public Date getCtime() {
		return ctime;
	}

	public void setCtime(Date ctime) {
		this.ctime = ctime;
	}

	@Override
	public String toString() {
		StringBuilder sb = new StringBuilder();
		sb.append(getClass().getSimpleName());
		sb.append(" [");
		sb.append("Hash = ").append(hashCode());
		sb.append(", id=").append(id);
		sb.append(", cdWayId=").append(cdWayId);
		sb.append(", pkey=").append(pkey);
		sb.append(", pvalue=").append(pvalue);
		sb.append(", status=").append(status);
		sb.append(", creator=").append(creator);
		sb.append(", ctime=").append(ctime);
		sb.append(", serialVersionUID=").append(serialVersionUID);
		sb.append("]");
		return sb.toString();
	}

	@Override
	public boolean equals(Object that) {
		if(this == that) {
			return true;
		}
		if(that == null) {
			return false;
		}
		if(getClass() != that.getClass()) {
			return false;
		}
		ComDeclaProp other = (ComDeclaProp) that;
		return (this.getId() == null ? other.getId() == null : this.getId().equals(other.getId()))
		        && (this.getCdWayId() == null ? other.getCdWayId() == null
		                : this.getCdWayId().equals(other.getCdWayId()))
		        && (this.getPkey() == null ? other.getPkey() == null
		                : this.getPkey().equals(other.getPkey()))
		        && (this.getPvalue() == null ? other.getPvalue() == null
		                : this.getPvalue().equals(other.getPvalue()))
		        && (this.getStatus() == null ? other.getStatus() == null
		                : this.getStatus().equals(other.getStatus()))
		        && (this.getCreator() == null ? other.getCreator() == null
		                : this.getCreator().equals(other.getCreator()))
		        && (this.getCtime() == null ? other.getCtime() == null
		                : this.getCtime().equals(other.getCtime()));
	}

	@Override
	public int hashCode() {
		final int prime = 31;
		int result = 1;
		result = prime * result + ((getId() == null) ? 0 : getId().hashCode());
		result = prime * result + ((getCdWayId() == null) ? 0 : getCdWayId().hashCode());
		result = prime * result + ((getPkey() == null) ? 0 : getPkey().hashCode());
		result = prime * result + ((getPvalue() == null) ? 0 : getPvalue().hashCode());
		result = prime * result + ((getStatus() == null) ? 0 : getStatus().hashCode());
		result = prime * result + ((getCreator() == null) ? 0 : getCreator().hashCode());
		result = prime * result + ((getCtime() == null) ? 0 : getCtime().hashCode());
		return result;
	}
}
